<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration>

    <appender name="console" class="org.apache.log4j.ConsoleAppender">
        <param name="target" value="System.out"/>

        <layout class="org.apache.log4j.PatternLayout">
            <param name="conversionPattern" value="[%d{HH:mm:ss,SSS}] %p [%c: %L] %m%n"/>
        </layout>
    </appender>

    <appender name="file" class="org.apache.log4j.RollingFileAppender">
        <param name="file" value="hibernate-course-examples.log"/>

        <param name="append" value="true"/>
        <param name="maxFileSize" value="1KB"/>
        <param name="maxBackupIndex" value="10"/>

        <layout class="org.apache.log4j.PatternLayout">
            <param name="conversionPattern" value="[%d{HH:mm:ss,SSS}] %p [%c: %L] %m%n"/>
        </layout>

        <filter class="org.apache.log4j.varia.LevelRangeFilter">
            <param name="LevelMin" value="ALL"/>
        </filter>
    </appender>

    <logger name="ru.comavp.util" additivity="false">
        <level value="info"/>
        <appender-ref ref="console"/>
    </logger>

    <logger name="ru.comavp" additivity="false">
        <level value="info"/>
        <appender-ref ref="console"/>
    </logger>

    <root>
        <level value="info"/>
        <appender-ref ref="console"/>
        <appender-ref ref="file"/>
    </root>
</log4j:configuration>